#include <bits/stdc++.h>

using namespace std;
int three_floor(int n)
{
    return n/2+n/3+n/5;
}
int main_1087()
{
    int N,num=1,prev,now;
    scanf("%d",&N);
    prev=three_floor(1);
    for (int i=2;i<=N ; ++i)
    {
        now=three_floor(i);
        if (now!=prev)
        {
            ++num;
        }
        prev=now;
    }
    printf("%d",num);
    return 0;
}
